#ifndef CUSTOMDOMAINCREATEDLG_H
#define CUSTOMDOMAINCREATEDLG_H
//#include "ctcascader.h"

#include "precomp.h"

//#include <QDialog>
//#include <QSqlDatabase>
//#include <QSqlError>
//#include <QSqlQueryModel>
//#include <QSqlQuery>

class TDomain ;

namespace Ui {
class CustomDomainCreateDlg;
}

class CustomDomainCreateDlg : public QDialog
{
    Q_OBJECT

public:
    explicit CustomDomainCreateDlg(QWidget *parent = nullptr);
    ~CustomDomainCreateDlg();

    QString m_treeType = "DnDiction";
    TDomain *m_tDomain;
    QSqlDatabase m_db;
    QMap<QString, QVector<QString>> m_cascadedItems;
    QMap<QString, QStringList*> m_cascadedItemsNew;
    QString m_selectedDictStr="单数字";
    QStringList m_usedDnSuffix,m_prefixOne,m_prefixTwo,m_transferData;
    void getDnDictFromDb();
    void getUsedDnSuffix();
    QStringList cartesianProduct(const QStringList &a, const QStringList &b);
private slots:
    void on_pb_Close_clicked();
    void slotSelectDictionary(int idx,QString selectStr);

    void on_btn_import_one_clicked();

    void on_btn_clear_one_clicked();

    void on_btn_import_two_clicked();

    void on_btn_clear_two_clicked();

    void on_pb_Create_clicked();

    void on_btn_clear_clicked();

    void on_pb_joinList_clicked();


signals:
    void dataTransfer(QStringList data); // 假设传递的是一个字符串

private:
    Ui::CustomDomainCreateDlg *ui;
};

#endif // CUSTOMDOMAINCREATEDLG_H
